package com.example.gpstest.Utils;

public class LocationUtils {
    private static final double PI = 3.14159265358979d;
    private static final String TAG = "GPSLocationUpdate";
    private static long multiConst = 12774274;
    private int mCount = 0;
    private int mCurrentTrackingCount = 0;
    private int mFixSuccessCount = 0;
    public int fixMode = 0;
    public int fixPolicy = 0;
    public int fixTime = 1;
    public int fixWay = 0;
    public double precisionLimit = 0.0d;
    public int testTime = 100;
    public int timeSpan = 1;
    public double trueLatitude = 0.0d;
    public double trueLongitude = 0.0d;
    public int ttff = 128;
    public int updatePeriod = 1;
    public boolean warmAlmanac = false;
    public boolean warmDgps = false;
    public boolean warmEphemeris = false;
    public boolean warmHealth = false;
    public boolean warmLono_uts = false;
    public boolean warmPosition = false;
    public boolean warmStr = false;
    public boolean warmTime = false;



    public static double getCep(double testLatitude, double testLongitude, double trueLatitude, double trueLongitude) {
        return Math.sqrt(Math.pow(Math.sin((PI * (testLatitude - trueLatitude)) / 360.0d), 2.0d) + (Math.cos((PI * testLatitude) / 180.0d) * Math.cos((PI * trueLatitude) / 180.0d) * Math.pow(Math.sin((PI * (testLongitude - trueLongitude)) / 360.0d), 2.0d))) * ((double) multiConst);
    }


}
